package com.jinbiao.quasar.util;

import java.util.List;
import java.util.stream.Collectors;

public class ListUtil {
    /**
     * @Description: 获取targetList中在sourceList中不存在的项
     * @param sourceList
     * @param targetList
     * @return: List<String>
     */
    public static List<String> getDiffrentList(List<String> sourceList, List<String> targetList)
    {
        return targetList.stream().filter(item->sourceList.stream().allMatch(each->!item.equals(each))).collect(Collectors.toList());
    }
}
